package com.redrose.videodemo.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.redrose.videodemo.activity.LearnPlanActivity;
import com.redrose.videodemo.camera.CameraActivity;
import com.redrose.videodemo.camera.CameraGLSurfaceViewActivity;
import com.redrose.videodemo.camera.CameraTextureActivity;
import com.redrose.videodemo.camera.PreviewActivity;
import com.redrose.videodemo.photo.ImageActivity;

/**
 * Desc:
 * Author: RedRose
 * Date: 2019/3/31
 * Email: yinsxi@163.com
 */

public class IntentUtils {
    public static void goToImageActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, ImageActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
    public static void goToPreviewActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, PreviewActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
    public static void goToLearnActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, LearnPlanActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
    public static void goToCameraTextureActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, CameraTextureActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
    public static void goToCameraSurfaceViewActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, CameraActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
    public static void goToCameraGLSurfaceViewActivity(Context context, Bundle bundle){
        Intent intent = new Intent(context, CameraGLSurfaceViewActivity.class);
        if(bundle != null){
            intent.putExtra("data",bundle);
        }
        context.startActivity(intent);
    }
}
